Open
Conversation
sreilly
commented
May 9, 2022
| <!-- A Java 9 or later compiler is required --> | ||
|
|
||
| <exec executable="java_home" outputproperty="jdk"> | ||
| <arg value="-F"/> |
Contributor
Author
There was a problem hiding this comment.
Including the -F never builds for me, because java_home -F doesn't obey the plus in 9+ and fails with any jdk other than version 9.*.
sreilly
commented
May 9, 2022
Comment on lines
+47
to
+54
| <!-- | ||
| JNFdir specifies the location of Apple's JavaNativeFoundation.framework which can be acquired | ||
| at https://github.com/apple/openjdk/tree/xcodejdk14-release/apple/JavaNativeFoundation | ||
| Build it using Xcode and place the resulting JavaNativeFoundation.framework in the lib folder, | ||
| or override the JNFdir property to point to a folder that contains your own build of the framework. | ||
| --> | ||
| <property name="JNFdir" location="${base}/lib/"/> | ||
|
|
Contributor
Author
There was a problem hiding this comment.
The JavaNativeFoundation framework is not (or is no longer) present under the SDK folder, so explain how to get it and where to put it.
Contributor
|
I have also had problems with java_home. (Have you filed a bug report?)
Rather than add a specific workaround, I was thinking that it would be better to define a property that can be set on the ant command line and run java_home only if that property is undefined.
Call it something like BUILD_JDK, perhaps?
If java_home is run and it fails, then generate a suitable error message that mentions the property to set.
What do you think?
… On May 9, 2022, at 3:17 PM, Sean Reilly ***@***.***> wrote:
@sreilly commented on this pull request.
In release/build-common.xml <#3 (comment)>:
> @@ -9,7 +9,6 @@
<!-- A Java 9 or later compiler is required -->
<exec executable="java_home" outputproperty="jdk">
- <arg value="-F"/>
Including the -F never builds for me, because java_home -F doesn't obey the plus in 9+ and fails with any jdk other than version 9.*.
—
Reply to this email directly, view it on GitHub <#3 (review)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABSSJGO7OKYI372NVQR5N2TVJGFGLANCNFSM5VPULXAA>.
You are receiving this because you are subscribed to this thread.
|
Contributor
|
I gather Apple has removed the backward compatibility link for JavaRuntimeSupport.
Doesn’t this change break the library when run on an old system where JavaRuntimeSupport is a nested framework?
Would it work to have two -F arguments so that it works on old releases as well as new ones?
… On May 9, 2022, at 3:19 PM, Sean Reilly ***@***.***> wrote:
@sreilly commented on this pull request.
In release/build-common.xml <#3 (comment)>:
> + <arg value="-F${SDKroot}/System/Library/Frameworks"/>
+ <arg value="-framework"/>
+ <arg value="JavaRuntimeSupport"/>
+
reorder this, because JNF needs to take priority to build, and path to the framework in the SDK
—
Reply to this email directly, view it on GitHub <#3 (review)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABSSJGLPSPCAJP3J4NUWBFDVJGFOHANCNFSM5VPULXAA>.
You are receiving this because you are subscribed to this thread.
|
Contributor
|
It seems that Apple did not remove the backward compatibility symlink under JavaVM.framework, which is good.
It is important that the dynamic library refer to the nested location, otherwise it will not load on an old macOS release without LD_LIBRARY_PATH being set.
The JDK osxui dynamic library refers to the nested location.
I suspect the way to get that to happen is to either use only the nested location in -F or have it be the first one.
Check the output using otool -l.
… On May 10, 2022, at 6:07 PM, Alan Snyder ***@***.***> wrote:
I gather Apple has removed the backward compatibility link for JavaRuntimeSupport.
Doesn’t this change break the library when run on an old system where JavaRuntimeSupport is a nested framework?
Would it work to have two -F arguments so that it works on old releases as well as new ones?
> On May 9, 2022, at 3:19 PM, Sean Reilly ***@***.*** ***@***.***>> wrote:
>
>
> @sreilly commented on this pull request.
>
> In release/build-common.xml <#3 (comment)>:
>
> > + <arg value="-F${SDKroot}/System/Library/Frameworks"/>
> + <arg value="-framework"/>
> + <arg value="JavaRuntimeSupport"/>
> +
> reorder this, because JNF needs to take priority to build, and path to the framework in the SDK
>
> —
> Reply to this email directly, view it on GitHub <#3 (review)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABSSJGLPSPCAJP3J4NUWBFDVJGFOHANCNFSM5VPULXAA>.
> You are receiving this because you are subscribed to this thread.
>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The original build file didn't work for me for a few reasons. One was that some of the framework paths under the SDK folder didn't exist. This PR also tries to clarify how to get the JavaNativeFoundation framework and where to put it. Finally, some of the framework path parameters needed to be reordered in order to build successfully.